package serialization ;
import java.util.Iterator;
import java.util.Vector;

/**
 *
 * @author sdecrem
 */

public class Foo {
   private String foo ;
   private Vector footest = new Vector() ;

   public void addToVector (int info) {
       footest.add(info);
   }

   public void setFoo(String s) {
     foo = s;
   }

   public String getFoo() {
     return foo;
   }

   public void setFootest(Vector v) {
       footest = v ;
   } // necessaire pour la serialization et l'enregistrement du fichier xml

   // conclusion : serialization => setters et getters

   public Vector getFootest() {
       return footest ;
   }

   public String toString() {
       Iterator iter = footest.iterator() ;
       String pop = "";
       while(iter.hasNext())
           pop += iter.next()+" " ;
       return "FooBar : "+this.getFoo()+" "+pop ;
   }
}